/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rploo_ciayoo;

/**
 *
 * @author Rico
 */
public class Form_Utama extends javax.swing.JFrame {

    /** Creates new form Form_Utama */
    public Form_Utama() {
        initComponents();
        this.setLocationRelativeTo(Dosen);
        this.makeDosen();
        this.makeRegion();
        this.makeRuang();
        this.makePenjadwalan();
        this.makeLihatJadwal();

    }

    private void makeDosen() {
        Dosen = new Master_Dosen();
    }

    private void makeRegion() {
        Makul = new Master_MataKuliah();
    }
    private void makeRuang(){
        Ruang= new Master_Ruang();
    }
    private void makePenjadwalan(){
        Penjadwalan= new Master_Penjadwalan();
    }
    private void makeLihatJadwal(){
        LihatJadwal= new Master_LihatJadwal();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDesktopPane1 = new javax.swing.JDesktopPane();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        MasterDosenMenu = new javax.swing.JMenuItem();
        MasterKuliahMenu = new javax.swing.JMenuItem();
        masterRuangMenu = new javax.swing.JMenuItem();
        MasterPenjadwalanMenu = new javax.swing.JMenuItem();
        masterLihatJadwalMenu = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jDesktopPane1.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/sadhar.gif"))); // NOI18N
        jLabel1.setBounds(500, 150, 190, 160);
        jDesktopPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLabel2.setText("Selamat Datang");
        jLabel2.setBounds(420, 70, 300, 50);
        jDesktopPane1.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLabel3.setText("Sistem Informasi Jadwal Kuliah");
        jLabel3.setBounds(280, 330, 600, 80);
        jDesktopPane1.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jMenu1.setText("File");

        MasterDosenMenu.setText("Master Dosen");
        MasterDosenMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MasterDosenMenuActionPerformed1(evt);
            }
        });
        jMenu1.add(MasterDosenMenu);

        MasterKuliahMenu.setText("Master Mata Kuliah");
        MasterKuliahMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MasterKuliahMenuActionPerformed(evt);
            }
        });
        jMenu1.add(MasterKuliahMenu);

        masterRuangMenu.setText("Master Ruang");
        masterRuangMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                masterRuangMenuActionPerformed(evt);
            }
        });
        jMenu1.add(masterRuangMenu);

        MasterPenjadwalanMenu.setText("Master Penjadwalan");
        MasterPenjadwalanMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MasterPenjadwalanMenuActionPerformed(evt);
            }
        });
        jMenu1.add(MasterPenjadwalanMenu);

        masterLihatJadwalMenu.setText("Master Lihat Jadwal");
        masterLihatJadwalMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                masterLihatJadwalMenuActionPerformed(evt);
            }
        });
        jMenu1.add(masterLihatJadwalMenu);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 571, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        jDesktopPane1.add(Dosen);
        Dosen.show();
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void MasterKuliahMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MasterKuliahMenuActionPerformed
        jDesktopPane1.add(Makul);
        Makul.show();
    }//GEN-LAST:event_MasterKuliahMenuActionPerformed

    private void masterRuangMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_masterRuangMenuActionPerformed
        jDesktopPane1.add(Ruang);
        Ruang.show();
    }//GEN-LAST:event_masterRuangMenuActionPerformed

    private void MasterPenjadwalanMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MasterPenjadwalanMenuActionPerformed
        jDesktopPane1.add(Penjadwalan);
        Penjadwalan.show();
    }//GEN-LAST:event_MasterPenjadwalanMenuActionPerformed

    private void masterLihatJadwalMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_masterLihatJadwalMenuActionPerformed
        jDesktopPane1.add(LihatJadwal);
        LihatJadwal.show();
    }//GEN-LAST:event_masterLihatJadwalMenuActionPerformed

    private void MasterDosenMenuActionPerformed1(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MasterDosenMenuActionPerformed1
        jDesktopPane1.add(Dosen);
        Dosen.show();
    }//GEN-LAST:event_MasterDosenMenuActionPerformed1

      public Form_Utama getMenuowner() {
        return menuowner;
    }

    public void setMenuowner(Form_Utama menuowner) {
        this.menuowner = menuowner;
    }
    
    public void visible(){
        menuowner.setVisible(true);
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Form_Utama().setVisible(true);
            }
        });
    }
    private Form_Utama menuowner;
    private Master_Dosen Dosen;
    private Master_MataKuliah Makul;
    private Master_Ruang Ruang;
    private Master_Penjadwalan Penjadwalan;
    private Master_LihatJadwal LihatJadwal;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem MasterDosenMenu;
    private javax.swing.JMenuItem MasterKuliahMenu;
    private javax.swing.JMenuItem MasterPenjadwalanMenu;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem masterLihatJadwalMenu;
    private javax.swing.JMenuItem masterRuangMenu;
    // End of variables declaration//GEN-END:variables

   
   
  

}
